<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('notifies', function (Blueprint $table) {
            $table->id();
            $table->unsignedBigInteger('days')->default(0);
            $table->date('send_date')->nullable();
            $table->string('module')->index()->comment('安全文明：safe');
            $table->unsignedBigInteger('project_id')->index()->comment('所属项目ID');
            $table->unsignedBigInteger('user_id')->index()->comment('发送人');
            $table->unsignedBigInteger('type_id')->index()->comment('类型');
            $table->tinyInteger('status')->default(1)->comment('状态');
            $table->string('remarks')->nullable();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('notifies');
    }
};
